package com.concurrent.chapter6.concurrent02;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class MyCalableB implements Callable<String> {

	@Override
	public String call() throws Exception {
		System.out.println("MyCalableB begin," + System.currentTimeMillis());
		TimeUnit.SECONDS.sleep(2);
		int i = 0;
		if(i == 0){
			throw new Exception("异常...");
		}
		System.out.println("MyCalableB end," + System.currentTimeMillis());
		return "MyCalableB";
	}
}
